<?php 
include_once(''.P.'/public/header.html');
?>

<script type="text/javascript" src="res/bootstrapplugin/jquery-bootstable.js"></script>
<script type="text/javascript" src="res/menu/jquery-rockmenu.js"></script>
<link rel="stylesheet" type="text/css" href="res/menu/jquery-rockmenu.css">


<script>

function initbody(){
	
	table = $('#viewshow').bootstable({
		url:'index.php?d=plat&m=users&a=data',method:'get',celleditor:true,tablename:'1',
		cellurl:'index.php',fanye:true,cellurl:'index.php?a=savecell',
		columns:[{
			text:'头像',dataIndex:'face',renderer:function(v){
				if(!v)v='images/noface.png';
				v='<img src="'+v+'" width="30">';
				return v;
			}
		},{
			text:'名称',dataIndex:'name'
		},{
			text:'用户名',dataIndex:'user'
		},{
			text:'手机号',dataIndex:'mobile'
		},{
			text:'邮箱',dataIndex:'email'
		},{
			text:'类型',dataIndex:'type',sortable:true,renderer:function(v){
				if(v=='0')v='普通用户';
				if(v=='1')v='平台管理员';
				return v;
			}
		},{
			text:'状态',dataIndex:'status',sortable:true,type:'checkbox',editor:true
		},{
			text:'注册时间',dataIndex:'regdt',sortable:true
		},{
			text:'创建单位数',dataIndex:'flaskm',sortable:true,type:'number',editor:true
		},{
			text:'ID',dataIndex:'id',sortable:true
		},{
			text:'',dataIndex:'opts',renderer:function(s,d){
				var str = '<a class="zhu" href="?d=plat&m=users&a=form&id='+d.id+'">编辑</a>&nbsp;';
				if(d.id!=adminid)str+='<a class="zhu" href="javascript:;" onclick="deleterecord('+d.id+',1,false)">删</a>';
				return str;
			}
		}]
	});
}

</script>
</head>

<body>

<?php 
include_once(''.P.'/public/top_plat.html');
?>

<div align="center">

<div style="width:<?=$maxwidth?>;margin:20px 0px" align="left">
	<div style="color:#cccccc">
		<a href="?d=plat" class="zhu"><?=lang('plat.home')?></a> &gt;
		<a href="" class="zhu"><?=lang('plat.users')?></a>
	</div>
	<div class="mainbody">
		<div style="padding:10px">
			<div style="padding:5px 0px">
			<table width="100%"><tr>
			<td align="left">
			<a class="webbtn" style="border-radius:5px" href="?d=plat&m=users&a=form&id=0">新增</a>
			</td>
			<td align="right">
			
			</td>
			</tr>
			</table>
			
			
			
			</div>
			<div class="blank10"></div>
			<div id="viewshow" style="overflow:auto"></div>
		</div>
		<div class="blank10"></div>
	</div>
</div>



<?php 
include_once(''.P.'/public/footer.html');
?>
</div>

</body>
</html>